class Practice < ActiveRecord::Base
#show new practices
def self.upcoming_practice
	find(:all, :conditions => "practice_date > CURRENT_TIMESTAMP()",
		   :order      => "practice_date")
end

#show past practices
def self.past_practice
	find(:all, :conditions => "practice_date <= CURRENT_TIMESTAMP()",
		   :order      => "practice_date")
end

#format date to look like a name
def name
 practice_date.to_s(:long)
end

#location
def location
 practice_location
end

#validation for the practice date
validates_presence_of :practice_date

#validation for the practice location
validates_presence_of :practice_location

#taggable plugin
acts_as_taggable

belongs_to:user


end
